<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>RouteBoxer v1.0 Reference</title>
    <link rel="stylesheet" type="text/css" href="http://code.google.com/css/codesite.css"></link>
    <link rel="stylesheet" type="text/css" href="../../util/docs/template/local_extensions.css"></link>
  </head>
  <body>
    <h1>RouteBoxer</h1>
    <p>
The RouteBoxer class takes a path, such as the Polyline for a
route generated by a Directions request, and generates a set of LatLngBounds
objects that are guaranteed to contain every point within a given distance
of that route. These LatLngBounds objects can then be used to generate
requests to spatial search services that support bounds filtering (such as
the Google Maps Data API) in order to implement search along a route.
<br/><br/>
RouteBoxer overlays a grid of the specified size on the route, identifies
every grid cell that the route passes through, and generates a set of bounds
that cover all of these cells, and their nearest neighbours. Consequently
the bounds returned will extend up to ~3x the specified distance from the
route in places.</p>
    <p>For a description and examples of how to use this library, check out the <a href="examples.html">how-to</a>.</p>
    
      <h2><a name="RouteBoxer"></a>class RouteBoxer</h2>
      <p></p>
      
        <h3>Constructor</h3>
        <table summary="class RouteBoxer - Constructor" width="90%">
          
          <tbody>
            <tr>
              <th>Constructor</th>
              
              <th>Description</th>
            </tr>
            
              <tr class="odd">
                <td><code>RouteBoxer()</code></td>
                
                <td>Creates a new RouteBoxer</td>
              </tr>
            
          </tbody>
        </table>
      
        <h3>Methods</h3>
        <table summary="class RouteBoxer - Methods" width="90%">
          
          <tbody>
            <tr>
              <th>Methods</th>
              
                
                  <th>Return&nbsp;Value</th>
                
              
              <th>Description</th>
            </tr>
            
              <tr class="odd">
                <td><code>box(<span class="type">path:google.maps.LatLng[] | google.maps.Polyline</span>, <span class="type">range:Number</span>)</code></td>
                
                  
                    <td><code>google.maps.LatLngBounds[]</code></td>
                  
                
                <td>Generates boxes for a given route and distance</td>
              </tr>
            
          </tbody>
        </table>
      
    
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    <script type="text/javascript">
      _uacct = "UA-964209-4";
      urchinTracker();
    </script> 
  </body>
</html>
